package com.lottery.game.core.modules.service.game.impl;

import com.lottery.game.common.base.service.impl.AbstractBaseServiceImpl;
import com.lottery.game.common.bean.BeanConverter;
import com.lottery.game.core.model.dto.game.GameTypePlayingLotteryRuleTO;
import com.lottery.game.core.modules.entity.game.GameTypePlayingLotteryRule;
import com.lottery.game.core.modules.service.game.GameTypePlayingLotteryRuleService;

import org.springframework.stereotype.Service;

import java.util.List;

@Service("gameTypePlayingLotteryRuleService")
public class GameTypePlayingLotteryRuleServiceImpl extends AbstractBaseServiceImpl<GameTypePlayingLotteryRule> implements GameTypePlayingLotteryRuleService {

    @Override
    public List<GameTypePlayingLotteryRuleTO> rules(String playingId) {
        GameTypePlayingLotteryRule param = new GameTypePlayingLotteryRule();
        param.setGameTypePlayingId(playingId);
        return BeanConverter.convert(GameTypePlayingLotteryRuleTO.class, select(param));
    }
}
